package com.briup.smart.evn.client;

import org.junit.Test;

import java.io.BufferedReader;
import java.io.FileReader;
import java.io.InputStreamReader;
import java.util.Arrays;

public class GatherTest {
    @Test
    public void test01() throws Exception{
        BufferedReader br = new BufferedReader(new FileReader("src/main/resources/data-file-simple"));
        System.out.println(br);
        String line = br.readLine();
        System.out.println("read:"+line);
        if(br!=null){
            br.close();
        }
    }
    @Test
    public void test02(){
        String s1 = "100|101|2|16|1|3|5d606f7802|1|1516323596029";
        String[] split = s1.split("\\|");
        System.out.println("length:"+split.length);
        System.out.println("split:"+ Arrays.toString(split));
    }
    @Test
    public void test03(){
        String s1 = "5d606f7802";
        String substring = s1.substring(0,4);
        System.out.println("substring:"+substring);
    }
    @Test
    public void test04(){
        int i = Integer.parseInt("5d80",16);
        System.out.println("i:"+i);
    }


}
